package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 经销商授权代理商记录
 * 
 * @author Tino
 * 
 */
@Entity
@Table(name = "QXGL_AGENCY_GRANT_RECORD")
public class AgencyGrantRecord extends IdEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5818723305014762651L;
	/**
	 * 代理商
	 * 
	 */
	private User agency;
	/**
	 * 经销商
	 * 
	 */
	private User dealer;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AGENCY_ID")
	public User getAgency() {
		return agency;
	}

	public void setAgency(User agency) {
		this.agency = agency;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEEALER_ID")
	public User getDealer() {
		return dealer;
	}

	public void setDealer(User dealer) {
		this.dealer = dealer;
	}

}
